package com.fxsh.learn.shiro.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fxsh.learn.shiro.entity.Role;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RoleMapper extends BaseMapper<Role> {
    @Select("select r.id, r.role_name from roles r join emp_role er on r.id = er.role_id where er.emp_no = #{empNo}")
    List<Role> getRolesByEmpNo(int empNo);
}
